package com.zidian.teacher.activity;

import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.view.ViewPager;

import com.zidian.teacher.R;
import com.zidian.teacher.adapter.EvaluatePagerAdapter;
import com.zidian.teacher.common.ToolBarActivity;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * Created by GongCheng on 2017/1/9.
 */

public class EvaluateActivity extends ToolBarActivity {
    @Bind(R.id.evaluate_tab)
    TabLayout evaluateTab;
    @Bind(R.id.evaluate_view_pager)
    ViewPager evaluateViewPager;

    private EvaluatePagerAdapter pagerAdapter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setToolbarView(R.layout.toolbar_left);
        setContentView(R.layout.activity_evaluate);
        setTitle("评价详情");
        ButterKnife.bind(this);
        initView();
    }

    private void initView() {
        pagerAdapter = new EvaluatePagerAdapter(getSupportFragmentManager());
        evaluateViewPager.setAdapter(pagerAdapter);
        evaluateTab.setupWithViewPager(evaluateViewPager);
    }
}
